package proxy;

import java.util.Arrays;

public class ProxyUtil {

    public static void printExtend(Object obj) {
        String sj = "";
        Class<?> parentClass = obj.getClass();
        for (; null != parentClass; ) {
            System.out.println(sj + parentClass);
            parentClass = parentClass.getSuperclass();
            sj = sj + "  ";
        }

        Class<?>[] interfaces = obj.getClass().getInterfaces();
        System.out.println("接口：" + Arrays.toString(interfaces));
        System.out.println();
    }

}
